import request from '@/utils/request'

// 查询学者风采列表
export function listExpert(query) {
  return request({
    url: '/system/expert/list',
    method: 'get',
    params: query
  })
}

// 查询学者风采详细
export function getExpert(id) {
  return request({
    url: '/system/expert/' + id,
    method: 'get'
  })
}

// 新增学者风采
export function addExpert(data) {
  return request({
    url: '/system/expert',
    method: 'post',
    data: data
  })
}

// 修改学者风采
export function updateExpert(data) {
  return request({
    url: '/system/expert',
    method: 'put',
    data: data
  })
}

// 删除学者风采
export function delExpert(id) {
  return request({
    url: '/system/expert/' + id,
    method: 'delete'
  })
}

//上移 下移
export function moveUpOrDown(data) {
  return request({
    url: '/system/expert/moveUpOrDown',
    method: 'put',
    data
  })
}

//置顶 置底
export function pinToTopOrEnd(data) {
  return request({
    url: '/system/expert/pinToTopOrEnd',
    method: 'put',
    data
  })
}
